package cassandrawindow;

/**
 * Created with IntelliJ IDEA.
 * User: tuyuri
 * Date: 10/8/12
 * Time: 2:07 PM
 * To change this template use File | Settings | File Templates.
 */

import me.prettyprint.cassandra.service.OperationType;
import me.prettyprint.hector.api.ConsistencyLevelPolicy;
import me.prettyprint.hector.api.HConsistencyLevel;


import me.prettyprint.cassandra.service.OperationType;
import me.prettyprint.hector.api.ConsistencyLevelPolicy;
import me.prettyprint.hector.api.HConsistencyLevel;
import org.apache.cassandra.thrift.ConsistencyLevel;

public final class VccSimpleConsistentLevel implements ConsistencyLevelPolicy {

    @Override
    public HConsistencyLevel get(OperationType op) {
        switch (op) {
            case READ:
                return HConsistencyLevel.ONE;
            case WRITE:
                return HConsistencyLevel.ONE;
            case META_READ:
                return HConsistencyLevel.ONE;
            default:
                return HConsistencyLevel.ONE; //Just in Case
        }
    }

    @Override
    public HConsistencyLevel get(OperationType op, String cfName) {
        return HConsistencyLevel.ONE;
    }
}
